home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / manage / snmp / mit / doc / snmpset.tex < prev    next >
Encoding:
Text File  |  1991-05-17  |  2.5 KB  |  85 lines

  1. %
  2. %    $Header: snmpset.tex,v 3.0 91/05/17 16:16:12 jrd Rel $
  3. %    Author: J. Davin
  4. %    Copyright 1988, 1989, Massachusetts Institute of Technology
  5. %
  6.  
  7. \newpage
  8. \subsection{The Snmpset Command}
  9.  
  10. The snmpset command initiates a network management
  11. request to remote management agent and displays the
  12. response. It is coded to run in a BSD 4.3 UNIX environment.
  13.  
  14. The code for the snmpset command illustrates the use of the
  15. Development Kit to accelerate development
  16. of network management applications as well as the
  17. use of the SNMP protocol {\it set} operation.
  18.  
  19. Sources for the snmpset command reside in the
  20. \verb"snmpset" subdirectory of the Development Kit
  21. distribution hierarchy.
  22.  
  23. The snmpset command attempts to alter the
  24. items of management information named
  25. according to the conventions of RFC 1067 to have values
  26. specified by the user.
  27. It is invoked with the syntax:
  28.  
  29. {\bf snmpset} [{\bf -h} {\it remoteHost}] [{\bf -p} {\it remotePort}]
  30. [{\bf -c} {\it communityName}]
  31. [{\bf -t} {\it timeout}]
  32. [{\bf -i} {\it requestId}]
  33. [{\it name kind value} ] $\ldots$
  34.  
  35. If the {\bf -h} flag is present, then the program
  36. will send its management request
  37. to the IP address specified as {\it remoteHost.}
  38.  
  39. If the {\bf -p} flag is present, then the program
  40. will send its management request
  41. to the UDP port specified as {\it remotePort,}
  42. instead of that assigned to the ``snmp'' service
  43. in the \verb"/etc/services" database.
  44.  
  45. If the {\bf -c} flag is present, then the program
  46. will generate and accept management requests
  47. associated with the community name specified as {\it communityName,}
  48. instead of using the community name ``public.''
  49.  
  50. If the {\bf -i} flag is present, then the program
  51. will identify its management request by
  52. the number specified as {\it requestId,}
  53. instead of using the value zero.
  54.  
  55. If the {\bf -t} flag is present, then the program
  56. will terminate after the number of seconds
  57. specified as {\it timeout,}
  58. instead of waiting forever for a response from the
  59. remote agent.
  60.  
  61. For example, the command
  62.  
  63. snmpset -h anyhost 1.3.6.1.2.1.1.1.0 OctetString ``hello''
  64. 1.3.6.1.2.1.1.2.0 ObjectId 1.2.3.4.5.6.7
  65.  
  66. has the (hypothetical) effect of altering the
  67. \verb"sysDescr" and \verb"sysObjectId"
  68. values for the host named {\it anyhost.} The former
  69. is altered to the \verb"OctetString" value ``hello,''
  70. whereas the latter is altered to the \verb"ObjectId"
  71. value 1.2.3.4.5.6.7.
  72.  
  73. The kinds of values recognized are those enumerated in
  74. RFC 1065:
  75. \begin{quote}\small\begin{verbatim}
  76. Integer
  77. Counter
  78. Guage
  79. OctetString
  80. ObjectId
  81. IPAddr
  82. TimeTicks
  83. \end{verbatim}\end{quote}
  84.  
  85.